export enum ScheduleStatus {
  PENDING = 'pending',
  IN_PROGRESS = 'in_progress',
  COMPLETED = 'completed',
  CANCELLED = 'cancelled'
}

export enum SchedulePriority {
  LOW = 'low',
  MEDIUM = 'medium',
  HIGH = 'high',
  URGENT = 'urgent'
}

export enum ScheduleRepeatType {
  NONE = 'none',
  DAILY = 'daily',
  WEEKLY = 'weekly',
  MONTHLY = 'monthly',
  YEARLY = 'yearly'
}

export interface ScheduleCreate {
  title: string;
  description?: string | null;
  start_time: string;
  end_time: string;
  status?: ScheduleStatus;
  priority?: SchedulePriority;
  repeat_type?: ScheduleRepeatType;
  repeat_until?: string | null;
  is_reminder_enabled?: boolean;
  reminder_minutes?: number | null;
  location?: string | null;
  notes?: string | null;
  member_id: number;
  participant_ids?: number[] | null;
}

export interface ScheduleUpdate {
  title?: string | null;
  description?: string | null;
  start_time?: string | null;
  end_time?: string | null;
  status?: ScheduleStatus | null;
  priority?: SchedulePriority | null;
  repeat_type?: ScheduleRepeatType | null;
  repeat_until?: string | null;
  is_reminder_enabled?: boolean | null;
  reminder_minutes?: number | null;
  location?: string | null;
  notes?: string | null;
  member_id?: number | null;
  participant_ids?: number[] | null;
}

export interface ScheduleResponse {
  id: number;
  family_id: number;
  member_id: number;
  member_name?: string | null;
  family_name?: string | null;
  title: string;
  description?: string | null;
  start_time: string;
  end_time: string;
  status: ScheduleStatus;
  priority: SchedulePriority;
  repeat_type: ScheduleRepeatType;
  repeat_until?: string | null;
  is_reminder_enabled: boolean;
  reminder_minutes?: number | null;
  location?: string | null;
  notes?: string | null;
  created_at: string;
  updated_at?: string | null;
}

export interface ScheduleDetailResponse extends ScheduleResponse {
  participants: ScheduleParticipantResponse[];
}

export interface ScheduleParticipantResponse {
  id: number;
  schedule_id: number;
  member_id: number;
  member_name?: string | null;
  is_required: boolean;
  has_confirmed: boolean;
  confirmed_at?: string | null;
  notes?: string | null;
}

export interface ScheduleList {
  schedules: ScheduleResponse[];
  total: number;
}

export interface ScheduleStats {
  total_count: number;
  pending_count: number;
  in_progress_count: number;
  completed_count: number;
  cancelled_count: number;
  high_priority_count: number;
  urgent_count: number;
}

export interface ScheduleFilters {
  skip?: number;
  limit?: number;
  member_id?: number | null;
  start_date?: string | null;
  end_date?: string | null;
  status?: ScheduleStatus | null;
  priority?: SchedulePriority | null;
  search?: string | null;
}